<?php /*a:1:{s:70:"D:\phpstudy_pro\WWW\www.system.loc\app\install\view\install\step2.html";i:1597971115;}*/ ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>vaeThink</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="/static/admin_static/lib/layui/css/layui.css"  media="all">
</head>
<body>
<div style="width:800px;margin: 100px auto;">
  <div class="layui-layout layui-layout-admin">
  <div class="layui-header layui-bg-cyan">
    <div class="layui-logo" style="color: #fff">vaeThink 安装引导</div>
  </div>
  <div style="border:1px solid #eee;padding:20px;line-height: 25px;">
    <h3>环境检测</h3>
    <table class="layui-table" lay-skin="nob" lay-size="sm">
      <colgroup>
        <col width="150">
        <col width="200">
        <col width="200">
        <col width="100">
        <col>
      </colgroup>
      <thead>
        <tr>
          <th>环境</th>
          <th>最低配置</th>
          <th>当前配置</th>
          <th>是否符合</th>
        </tr> 
      </thead>
      <tbody>
        <tr>
          <td>操作系统</td>
          <td>不限</td>
          <td><?php echo php_uname('s'); ?></td>
          <td class="yes"><i class="layui-icon layui-icon-ok"></i></td>
        </tr>
        <tr>
          <td>php版本</td>
          <td>≥ 7.1</td>
          <td><?php echo PHP_VERSION ?></td>
          <?php $php_version=explode('.', PHP_VERSION); ?>
          <td class="<?php if($php_version['0']>=7 && $php_version['1']>=1)echo 'yes'; ?>">
              <?php if ($php_version['0']>=7 && $php_version['1']>=1): ?>
                  <i class="layui-icon layui-icon-ok"></i>
              <?php else: ?>
                  <i class="layui-icon layui-icon-close"></i>
              <?php endif ?>
          </td>
        </tr>
      </tbody>
    </table>
    <h3>模块检测</h3>
    <table class="layui-table" lay-skin="nob" lay-size="sm">
      <colgroup>
        <col width="150">
        <col width="200">
        <col width="200">
        <col width="100">
        <col>
      </colgroup>
      <thead>
        <tr>
          <th>环境</th>
          <th>最低配置</th>
          <th>当前配置</th>
          <th>是否符合</th>
        </tr> 
      </thead>
      <tbody>
        <tr>
          <td>session</td>
          <td>支持</td>
          <td><?php if($data['session'] == '1'): ?>支持<?php else: ?>不支持<?php endif; ?></td>
          <td><i class="layui-icon <?php if($data['session'] == '1'): ?>layui-icon-ok yes<?php else: ?>layui-icon-close<?php endif; ?>"></i></td>
        </tr>
        <tr>
          <td>PDO</td>
          <td>开启</td>
          <td><?php if($data['pdo'] == '1'): ?>已开启<?php else: ?>未开启<?php endif; ?></td>
          <td><i class="layui-icon <?php if($data['pdo'] == '1'): ?>layui-icon-ok yes<?php else: ?>layui-icon-close<?php endif; ?>"></i></td>
        </tr>
        <tr>
          <td>PDO_Mysql</td>
          <td>开启</td>
          <td><?php if($data['pdo_mysql'] == '1'): ?>已开启<?php else: ?>未开启<?php endif; ?></td>
          <td><i class="layui-icon <?php if($data['pdo_mysql'] == '1'): ?>layui-icon-ok yes<?php else: ?>layui-icon-close<?php endif; ?>"></i></td>
        </tr>
        <tr>
          <td>上传限制</td>
          <td>≥ 2M</td>
          <td><?php if($data['upload_size'] == '0'): ?>不支持<?php else: ?><?php echo htmlentities($data['upload_size']); ?><?php endif; ?></td>
          <td><i class="layui-icon <?php if($data['upload_size'] == '0'): ?>layui-icon-close<?php else: ?>layui-icon-ok yes<?php endif; ?>"></i></td>
        </tr>
      </tbody>
    </table>
    <h3>目录权限</h3>
    <table class="layui-table" lay-skin="nob" lay-size="sm">
      <colgroup>
        <col width="150">
        <col width="200">
        <col width="200">
        <col width="100">
        <col>
      </colgroup>
      <thead>
        <tr>
          <th>环境</th>
          <th>最低配置</th>
          <th>当前配置</th>
          <th>是否符合</th>
        </tr> 
      </thead>
      <tbody>
        <tr>
            <td>config</td>
            <td>可写</td>
            <td>
                <?php if (is_writable(config_path())): ?>
                    可写
                <?php else: ?>
                    不可写
                <?php endif ?>
            </td>
            <td class="<?php if(is_writable(config_path()))echo 'yes'; ?>">
                <?php if (is_writable(config_path())): ?>
                    <i class="layui-icon layui-icon-ok"></i>
                <?php else: ?>
                    <i class="layui-icon layui-icon-close"></i>
                <?php endif ?>
            </td>
        </tr>
      </tbody>
  </table>
    <div style="margin:10px auto;width: 190px;">
      <a href="<?php echo url('install/install/index'); ?>" class="layui-btn layui-bg-cyan">上一步</a>
      <a href="javascript:;" class="layui-btn layui-bg-cyan" id="step2">下一步</a>
    </div>
  </div>
</div>
</div>     
          
<script src="/static/admin_static/lib/layui/layui.js" charset="utf-8"></script>
<script>
layui.use(['jquery','layer'], function(){
  var $ = layui.jquery,layer = layui.layer;
  
  $('#step2').click(function(){
    if($('.yes').length!=7){
        layer.tips('您的配置或权限不符合要求',this);
    }else{
        location.href="<?php echo url('install/install/step3',['accept'=>2]); ?>";
    }
  })

});
</script>

</body>
</html>